Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented Apr 9, 2025

This was a bit tricky to follow/understand, and should hopefully be clearer now.

I noticed this while trying to change some sidebar styling, that this is pretty hard to reason about.

Now, this PR:

  • Removes options on DynamicNav that were not actually used anymore at all
  • Combines withChevron and collapse into a single collapsible property, as we always use this together anyhow (except in one place in develop docs, where IMHO it is fine to also be consistent...)
  • Removed this construct where we passed in the header class name - we can just import the style directly there, making this consistent and easier to understand/style.
  • Removed one code path in DynamicNav handling if no parentNode exists - this is never the case as far as I can tell, we can just bail out in this theoretical case.

This was a bit tricky to follow/understand, and should hopefully be clearer now.
@mydea mydea requested review from a-hariti and chargome April 9, 2025 08:56
@mydea mydea self-assigned this Apr 9, 2025
@vercel
Copy link

vercel bot commented Apr 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
develop-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2025 0:41am
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2025 0:41am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview Apr 10, 2025 0:41am

@codecov
Copy link

codecov bot commented Apr 9, 2025

Bundle Report

Changes will decrease total bundle size by 600 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 11.13MB -552 bytes (-0.0%) ⬇️
sentry-docs-client-array-push 9.47MB -48 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.75MB -0.0%
../instrumentation.js -3 bytes 1.08MB -0.0%
9523.js -3 bytes 1.05MB -0.0%
2065.js -543 bytes 81.96kB -0.66%

Files in 2065.js:

  • ./src/components/sidebar/productSidebar.tsx → Total Size: 3.83kB

  • ./src/components/sidebar/developDocsSidebar.tsx → Total Size: 3.89kB

  • ./src/components/sidebar/index.tsx → Total Size: 5.16kB

  • ./src/components/sidebar/sidebarLinks.tsx → Total Size: 3.24kB

  • ./src/components/sidebar/platformSidebar.tsx → Total Size: 1.97kB

  • ./src/components/sidebar/dynamicNav.tsx → Total Size: 4.46kB

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 868.7kB -0.0%
static/css/*.css -42 bytes 739.63kB -0.01%
static/chunks/8165-*.js -3 bytes 410.1kB -0.0%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
server/middleware-*.js -5.55kB 1.0kB -84.74%
static/ORkklmCyFAxxajSwDtZAo/_buildManifest.js (New) 578 bytes 578 bytes 100.0% 🚀
static/ORkklmCyFAxxajSwDtZAo/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/aRhJvd66kodZMKjNbnYSw/_buildManifest.js (Deleted) -578 bytes 0 bytes -100.0% 🗑️
static/aRhJvd66kodZMKjNbnYSw/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@mydea mydea merged commit ba09636 into master Apr 11, 2025
13 checks passed
@mydea mydea deleted the fn/better-sidebar-component branch April 11, 2025 08:17
@github-actions github-actions bot locked and limited conversation to collaborators Apr 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants